
 
 F u n c t i o n :   g e t A c c N a m e ( d o m E l e m e n t ) 
 
 
 
 D e s c r i p t i o n :   R e t u r n s   t h e   a c c e s s i b l e   n a m e   c o m p u t a t i o n   f o r   b o t h   t h e   N a m e   a n d   D e s c r i p t i o n   p r o p e r t i e s   i n   a c c o r d a n c e   w i t h   t h e   l a t e s t   W 3 C   A c c N a m e   P r o t o t y p e   a l g o r i t h m . 
 
 
 
 R e t u r n s :   O b j e c t   w i t h   p r o p e r t i e s :   " n a m e " ,   " d e s c " ,   a n d   " e r r o r " 
 
 
 
 R e q u i r e s   m o d u l e :   " A c c N a m e " 
 
 
 
 N o t e :   T h i s   i s   n o t   t h e   s a m e   a s   t h e   g e t T e x t ( )   m e t h o d ,   b u t   r a t h e r   e x p l i c i t l y   f o l l o w s   t h e   a l g o r i t h m   s p e c i f i e d   i n   t h e   A c c N a m e   c o m p u t a t i o n   f o r   c o m p u t i n g   N a m e s   a n d   D e s c r i p t i o n s   w i t h i n   t h e   a c c e s s i b i l i t y   t r e e .   I n   a c c o r d a n c e   w i t h   t h e   W 3 C   A c c N a m e   s p e c i f i c a t i o n ,   a n   e l e m e n t   m a y   o n l y   h a v e   a n   a c c e s s i b l e   n a m e   i f   i t   m e e t s   t h e   d e f i n i t i o n   o f   s p e c i f i c   c r i t e r i a .   T h e   g e t A c c N a m e   f u n c t i o n   d o e s   n o t   s u p p o r t   c h a i n i n g . 
 
 F o r   f u r t h e r   d e t a i l s   r e g a r d i n g   t h e   A c c N a m e   a l g o r i t h m ,   v i s i t :   h t t p s : / / g i t h u b . c o m / w h a t s o c k / w 3 c - a l t e r n a t i v e - t e x t - c o m p u t a t i o n 
 
 
 
 E x a m p l e : 
 
 
 
 $ A . i m p o r t ( " A c c N a m e " ,   {   d e f e r :   t r u e   } ,   f u n c t i o n ( )   { 
 
 
 
     / /   C o m p u t e   t h e   n a m e   a n d   d e s c r i p t i o n   o f   a   f o r m   f i e l d 
 
     v a r   a c c e s s i b l e   =   $ A . g e t A c c N a m e ( d o m E l e m e n t ) ; 
 
 
 
     / /   S h o w   t h e   a c c e s s i b l e   n a m e . 
 
     a l e r t (   a c c e s s i b l e . n a m e   ) ; 
 
 
 
     / /   S h o w   t h e   a c c e s s i b l e   d e s c r i p t i o n . 
 
     a l e r t (   a c c e s s i b l e . d e s c   ) ; 
 
 
 
 } ) ; 
 
 